#include <iostream>
#include <jsoncpp/json/json.h>
#include <boost/algorithm/string.hpp>
#include <ctemplate/template.h>
int main()
{

    // 添加字典数据到网页
    std::string html = "./test.html";
    std::string html_info = "网页渲染";
    // 数据字典
    ctemplate::TemplateDictionary root("test");
    root.SetValue("info", html_info);
    // 渲染对象
    ctemplate::Template *tpl = ctemplate::Template::GetTemplate(html, ctemplate::DO_NOT_STRIP); // DO_NOT_STRIP：保持html网页原貌                                                                                      //开始渲染，返回新的网页结果到out_html
    std::string out_html;
    tpl->Expand(&out_html, &root);
    std::cout << "渲染的带参html是:" << std::endl;
    std::cout << out_html << std::endl;
    return 0;
}